The present invention relates to a method and a device for servo-controlling DC motor and, more particularly, to the servo-control of a motor enabling quick change of the control mode among position control, velocity control and torque control.
A servo-controlling device supplying electric power to control position, velocity and torque to a direct current motor by the change of duty ratio on the basis of the supply of PWM (Pulse Width Modulation) signals to the electric power supplier equipped in a power line is known well. FIG. 59 shows a block diagram comprising a typical PWM servo controller for DC motor, which computes PWM target values based on target value of position DP0 as a control input information, current Cm of motor 2 and positional signal Ea, Eb of motor output shaft, and drives DC motor 2 under the control of electric power supplied in response to the PWM signals Ma, Mb corresponding to the PWM target values.
Numeral 90 in FIG. 59 is a PWM servo controller for DC motor 2. 7 is a superior controller supplying a target value for controlling position DP0 to PWM servo controller 90 according to the instructions of main controller in order to operate a not-shown mobile like a travelling truck. Of course, DC motor 2 is a power generator for operating movable parts like a robotic arms, and PWM signals transmitted from PWM servo controller 90 are supplied to the electric power supplier 3 equipped in a power line 62 for PWM servo-control. 31 is an ammeter for measuring current of motor 2, 1 is a position detector like an encoder and 46 is PWM commanding part for outputting PWM signals Ma, Mb to the electric power supplier 3.
The position of output shaft of motor 2 is controlled based on counting the number of pulses generated by encoder 1, therefore, feedback system for current equipped with current detecting part 43 is used to servo-control the position of output shaft in general as shown in FIG. 59. In this system, target values for controlling current are assigned to the values computed through the feedback control loop for velocity formed outside the feedback control loop for current, target values for controlling velocity are assigned to the values computed through the feedback control loop for position formed outside the feedback control loop for velocity, and target values for controlling position are assigned to the values transmitted from superior controller 7.
Not only the feedback control loop for current but the feedback control loop for velocity are also used for servo-controlling velocity of output shaft. The target values of velocity are given by superior controller 7. The feedback control loop for current is also used for servo-controlling torque. The target values of torque are given by superior controller 7.
DC motor theoretically generates torque TM in proportion to current Cm. This relation is formulated to TM=Cmxc3x97Kt by using proper torque constant Kt for DC motor. An acceleration corresponding to the inertia J of load including motor is produced by the torque TM generated, rotational velocity obtained through integrating the acceleration by time changes, moreover, position xcex8 obtained through integrating the velocity by time also changes. The equation of motion on which resistance of viscosity Cv in proportion to rotational velocity, spring constant K and frictional force M are reflected is formulated as follows;
TM=xcex8xc3x97J+xcex8xc3x97Cv+xcex8xc3x97K+M 
The existing control inevitably uses a multi-loop control system as shown in FIG. 59 because it controls DC motor according to such an equation of motion.
Since current loop, velocity loop and position loop are related to the integration with respect to time as mentioned above, their transient characteristics are largely different from each other. The response of current loop is highly more than 100 Hz, that of velocity loop 20-90 Hz and that of position loop only 10-20 Hz. Such difference among loops results in shocking a motor when the control mode is changed. In order to avoid such a shock high level computation is required. Though it is possible to directly compute target values for motor current based on a positional information, the rotational velocity for transferring to target position tends to become unstable. Such technology alone does not enable to stably rotate a DC motor and is of no practical use.
The free change of control mode of a motor is required to control the movement of mobile flexibly under the operation of DC motor. For example, making a truck travel slowly on a plane surface and stopping it at a target position with high accuracy can be achieved by position control only of a motor for driving wheels. However, high speed operation of a truck often requires the change of control mode of a motor as follows; initially accelerating a truck by the current control generating a maximum torque of motor, secondarily making it travel at a constant speed by velocity control after getting a desired speed, and finally stopping it slowly at the target position by position control after reaching the neighborhood of the destination. There is another example in the case of a machine for lifting heavy burden; initially generating enough torque to overcome the load acted on the machine by current control of DC motor and finally stopping the burden at the target position with high accuracy by the position control changed from preceding control near the target position.
In the control of FIG. 59 the change from current control (torque control) into velocity control requires computation in velocity calculating part since all of calculating parts are arranged in series. In result, the change into velocity control is delayed because much time for the computation is spent every change. The change from current control into position control requires not only computation in position calculating part but that in velocity calculating part, resulting in delaying more the change of the control. In any case a sudden change of revolutionary speed and/or torque of output shaft of motor is unavoidable at the change of control mode, resulting in often shocking the motor strongly. For the sake of smooth change from current control into position control a position calculating part must be always in operation, therefore, the position calculating part results in computing present position being unnecessary for torque control one after another also during torque control. Accordingly, the change from current control into position control has been impracticable.
Of course, the control mainly covered with position control is not impossible if correction factors relating to position are computed on the basis of information output by the desired sensor selected from between torque sensor and velocity sensor installed. But such a control system becomes complex since the process of various information is required for the control, which leads to a lowering of motor response and also promotes to rise the price of control system.
The apparatus for servo-controlling a motor with encoder is disclosed in U.S. Pat. No. 4,644,232 (JP62-32715 B1), which is simplified by providing with a counter serving both to detect rotational velocity and to detect position. However, even one counter hinders to make the apparatus small.
U.S. Pat. No. 4,323,832 (JP59-27013 B1) teaches a method for controlling the speed of a magnetic tape transport motor, which supplies an interrupting signal against the main program in response to the velocity signal output from velocity detector and carries out the program for controlling speed of a magnetic tape transport motor in response to the interrupting signal. The adoption of interrupting signals, however, delays the predetermined computation so that the servo-control with high managing capacity, e.g., terminating all of process within predetermined time, becomes impossible. In addition, in the case of using such an interruption keeping the time for acceptance of interruption in the control procedure results in lowering of motor response.
Further, an integrated circuit device of remote control type driving DC motor is disclosed in U.S. Pat. No. 5,218,276 (JP2,542,141). In this invention, the signal having a proper number sent by wireless is caught by a receiver only having the same number as the signal has, so that DC motor only corresponding to the number can be controlled in response to the signal output from the receiver. The device providing with a wireless unit is expensive, moreover, its reliability tends to be lowered as a result of being sensitive against the unwanted signals of the outside of system.
The invention solving the problem of giving a big shock to a motor at the change from current control into velocity control is disclosed in JP10-84686 A1 as a switching method for servo controller. The purpose of the invention is to weaken shock at the change of control mode by adding correction signals, which are generated by a calculator having a transmitting characteristics specified every loop, to control target value. Therefore, a means for correcting signals is prepared upstream of current feedback loop. But generating correction signals and processing for addition of them spend much time so that the transfer from present control to velocity control tends to being delayed and the movement of mobile will not respond quickly.
The first object of the present invention is to enable carrying out torque control, velocity control and position control of DC motor in one control unit to quickly and smoothly introduce a DC motor into the operation according to a new control mode in response to the change of mode. The second object is to enable the change of control mode without time lag and not to cause the shock based on the generation of sudden difference of revolutionary speed and/or torque of motor at the change of control mode. The third object is to promote making the control device small by using MPU only, further, to keep high reliability of control device by simplifying the line connection between an superior controller and a mobile equipped with plural DC motors.
The present invention is applied to a method for servo-controlling DC motor, controlling the electric power supplied to the motor according to PWM signals corresponding to PWM target values computed on the basis of both the motor information detected at the present time and the control input information including control target values, the method comprises following steps; first step is to compute PWM target values corresponding to the control modes designated by the control input information without lapping the computation of PWM target value corresponding to other control modes, spending one or plural infinitesimal intervals obtained by dividing a processing term of period T, when PWM signals regulating the electric power supplied to the motor are allotted, into n equal parts. Second step is to select one PWM target value according to the control mode designated by said control input information from among PWM target values computed every control mode during the present processing term. Third step is to output PWM signals corresponding to FWM selection values, which are selected at the processing term shortly previous to the present term, every infinitesimal interval of the present processing term, and final step is to carry out the process and/or computation allotted every infinitesimal interval at the timing scheduled in one processing term and to terminate the process and/or computation within the present processing term.
According to the present invention all of process and/or computation are carried out within one processing term by subdividing all of the computation in association with control of position, velocity and torque so that the output power of DC motor corresponding to a desired control mode can be quickly generated in response to the change of control mode. Since any PWM target value is always computed, interrupting procedure in association with the change of control mode and/or control target value is not required. The irregular interruption procedure is not used so that the predetermined process and/or computation can be allotted every infinitesimal interval, and the control with high response can be carried out because it is not required to keep intervals for accommodating the interrupting procedure in one processing term.